package ca.eloas.judging.rest.repositories;

import ca.eloas.judging.model.JudgeObject;
import ca.eloas.judging.model.TeamObject;

import javax.inject.Singleton;

/**
 * @author JP
 */
@Singleton
public class OfyJudgeRepository extends AbstractOfyRepository<JudgeObject> implements JudgeRepository {

    public OfyJudgeRepository() {
        super(JudgeObject.class);
    }

    public JudgeObject findByEmail(String email) {

        return getPersistence().load().type(JudgeObject.class).filter("name", email).first().get();
    }
}
